<template>
	<view class="userAgreement">
		<view v-html="memberDetail.content"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				memberDetail:'',
				type:''
			}
		},
		onLoad(option) {
			this.type = option.type;
			this.queryMemberDetail();
		},
		methods: {
			// 1隐私协议 2.注册协议 3会员介绍 5约运动规则 6匹配规则 7店铺入驻需须知
			queryMemberDetail () {
				let data = {
					type:this.type
				}
				this.http('/api/Index/get_agreement_details','post',data,false).then(res => {
					if (res.status == 200) {
						let reg = new RegExp("<img ", 'gi');
						res.data.agreement.content = res.data.agreement.content.replace(reg,"<img style='width:100%;'");
						this.memberDetail = res.data.agreement;
					}
				})
			},
		}
	}
</script>

<style lang="less">
	.userAgreement{
		padding: 32rpx;
	}
</style>
